package org.jetnuke.dao;

import java.util.Date;
import java.util.List;

import org.jetnuke.entities.LinksLinks;


public interface LinkLinkDAO {
	public LinksLinks retrieveByPK(int id) throws Exception ;
	public List selectAll()throws Exception;
	public int addNew(LinksLinks dc)throws Exception;
	public void update(LinksLinks top) throws Exception;
	public int countAll() throws Exception ;
	public void incHits(int id)throws Exception;
	public int countUser(int lid, String uname)throws Exception;
	public int countAllByCategory(int cid)throws Exception;
	public List getByHitsDown(int start, int limit )throws Exception;
	public int selectDateGreater(Date dt)throws Exception;
	public int countWithRating()throws Exception;
	public List selectWithRating(int totalVotesMin,int limit) throws Exception;
	public List selectTitleAsc(int cid, int offset, int rowcount)throws Exception;
	public List selectTitleDesc(int cid, int offset, int rowcount)throws Exception;
	public List selectDateAsc(int cid, int offset, int rowcount)throws Exception;
	public List selectDateDesc(int cid, int offset, int rowcount)throws Exception;
	
	public List selectRatingAsc(int cid, int offset, int rowcount)throws Exception;
	public List selectRatingDesc(int cid, int offset, int rowcount)throws Exception;
	public List selectHitsAsc(int cid, int offset, int rowcount)throws Exception;
	public List selectHitsDesc(int cid, int offset, int rowcount)throws Exception;
	public List selectTopDown( int limit)throws Exception;

	public int countSearch(String title, String description)throws Exception;

	public List search(String title, String description, int offset, int rowcount)throws Exception;
	public void deleteByLID(int lid)throws Exception;
}
